<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学生信息</title>
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>

<style>
body{padding: 0px;margin: 0px;}

#footer{width: auto;min-height: 60px;line-height:60px;text-

align:center;font-family:Arial, Helvetica, sans-serif}
#footer{border-top: thin solid #39A631;}#footer a{color:black;}
.con{width: 35%;height: 20em;margin-top:4em;min-width:260px;}
.con{border: thin solid #0080FF;}


 html,body{

               width: 100%;
               height: 100%

            } 
        body{
            background-color: #97CBFF;
            background-size: 100%;
           }


.con_title{background-color: #2894FF;width: auto;height: 3.5em;line-height: 

3.5em;text-align: center;min-width:260px;}
con_title_sp{font-family: "微软雅黑";font-size: 1.5em;font-weight: 

800;color: #FFF;}
.con_input{margin: 2em 0 1em 0;}

.submit-btn{width: 8em;height: 2em;background-color: #0080FF;border-radius: 

4px;border: 0px;color: #fff;font-family:"微软雅黑";font-size: 1em;font-

weight: bold;}
.con_input span{font-family: "微软雅黑";font-size: 1em;font-weight: 

bold;color: #333;}
.con_input input{width: 15em;padding: 0.5em 1em;border: 1px solid #bbb;}
.submit-btn{margin: 1em 0 1em 0;}
.con_select{margin-left: 2em;font-family:"微软雅黑";font-size: 1em;color: 

#333;}
</style>
<script>
         
          function getScore(){
        	 
        	 var sid=$("#id").val();
        	 $.ajax({
        		 url: "/SCORE",
        		 data:{"sno": sid},
        		 type:"post",
        		 success: function(res)
    			 {
    				 $.each(res,function(i,fl){
      	    		   var sid = fl.sno;//注意要与实体类中的名称相同
                       var name = fl.sname;
      	    		   var major=fl.smajor;
      	    		   var grade=fl.sgrade;
                       var cid= fl.cno;
                       var aname = fl.cname;
                       var sscore = fl.score;

                       var value = "<tr><td align='center'>"+sid+"</td>";
                        value +="<td align='center'>"+name+"</td><td align='center'>"+major+"</td><td align='center'>"+grade+"</td> <td align='center'>"+cid+"</td> <td align='center'>"+aname+"</td><td align='center'>"+sscore+"</td><tr/>";
                         
                       
                       $("#tb").append(value);//写入到id为tb的htmln部分
                      });
    			 }
    				
        	 })  
         }
         
       </script>

</head>
<body>

<div id="header">
<div class="header_title">
</div>

<div id="content">
<center>
<div class="con">
<div class="con_title">
<span class="con_title_sp">请输入你的学号</span>
</div>
<div class="con_panel">
<div class="con_input">
<span>学 号：</span><input type="text" id="id"/>
</div>

<input type="submit" value="确认查看" class="submit-btn" onclick="getScore()"/>
<input type="submit" value="返回" class="submit-btn" onclick="location.href='student.html'"/>

</div>
</div>
</center>
</div>


	<table id="tb" width="80%" border="1" cellspacing="0" cellpadding="0"
		align="center">
		<tr>

			<th align="center">学号</th>
			<th align="center">姓名</th>
			<th align="center">专业</th>
			<th align="center">年级</th>
			<th align="center">课程号</th>
			<th align="center">课程名</th>
			<th align="center">成绩</th>	

		</tr>
	</table>
</body>
</html>